<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="autor" content="Breezy New Media (info@breezy.cz)" />
<meta name="copyright" content="PointSpace - free website layout 2008" />
<meta name="description" content=""  />
<meta name="keywords" content="" />
<title>Advanced Databases TUE - Welcome</title>
<link rel="stylesheet" type="text/css" href="./css/default.css" media="screen" />
<link rel="stylesheet" type="text/css" href="./css/print.css" media="print" />
</head>
<f:view>
<body>

<div id="view">

  <div id="head">
    <div id="logo">
      <a href="" class="block">&nbsp;</a>
      <h1><a href="index.html">advanced<span>Databases</span></a></h1>
      <h2><a href="index.html">the music you are looking for..!</a></h2>
    </div>
    <hr class="hidden" />
    
    <jsp:include page="userMenu.jsp"/>
    
    <hr class="hidden" />
  </div>
  
  <div id="content">
    <div id="contentBlock">
      <div class="item last">
        <h2>Welcome </h2>

      </div>
      <div class="col1">
        <div class="item">
          <h3>Recommendations</h3>
          <p class="info">Nice to have you back today</p>
        </div>
        
        <div class="item last">
          <h3>Top Rated</h3>
          
          <h:form>
          	<t:dataTable newspaperColumns="3" newspaperOrientation="horizontal" style="border-width:0" value="#{musicProfileEngineBean.topRatedAlbums}" var="item">
          		<h:column>
          			<div style="width:160px">
          			<h:graphicImage value="#{item.image}" width="70px" height="70px"/>
          			<br/>
					<h:commandLink value="#{item.name}" action="albumInfo">
						<f:param name="albumKey" value="#{item.id}"></f:param>
						<f:param name="artistKey" value="#{item.artistId}"></f:param>
					</h:commandLink>
					<br/>
					<h:graphicImage style="border:0;vertical-align:bottom" value="images/ico/rating_.#{item.rating}.gif"></h:graphicImage>
					</div>          			
          		</h:column>
          	</t:dataTable>
          </h:form>
          
        </div>
        
		<div class="item last">
          <h3>Most Commented</h3>
          	<h:form>
          	<t:dataTable newspaperColumns="3" newspaperOrientation="horizontal" style="border-width:0" value="#{musicProfileEngineBean.mostCommentedAlbums}" var="item">
          		<h:column>
          			<div style="width:160px">
          			<h:graphicImage value="#{item.image}" width="70px" height="70px"/>
          			<br/>
					<h:commandLink value="#{item.name}" action="albumInfo">
						<f:param name="albumKey" value="#{item.id}"></f:param>
						<f:param name="artistKey" value="#{item.artistId}"></f:param>
					</h:commandLink>
					<br/>
					Comments: <b><h:outputText style="border:0;vertical-align:bottom" value="#{item.commentCount}"></h:outputText></b>
					</div>          			
          		</h:column>
          	</t:dataTable>
          	</h:form>
        </div>
      </div>
      <!-- /#cols 50:50 -->
    </div>
    
    <hr class="hidden" />
    
    <div id="menuBlock">
      <div class="box boxText">
        <h3>Personal profile:</h3>
        <p><strong><h:outputText value="#{loginManagerBean.lastName}"/>, <h:outputText value="#{loginManagerBean.firstName}"/></strong><br />email:&nbsp;<a href="index.html"><h:outputText value="#{loginManagerBean.email}"/></a></p>
        <br/>
        <h3>RSS Feeds</h3>
	      <div style="position:relative;">
			<a title="RSS Feed" href="http://localhost:8080/exist/ad/rssTopRatedAlbums.xql"><img src="images/ico/rss16x16.png"></a> <strong>Top Rated Albums</strong>
		  </div>
	      <div style="position:relative;">
			<a title="RSS Feed" href="http://localhost:8080/exist/ad/rssTopRatedArtists.xql"><img src="images/ico/rss16x16.png"></a> <strong>Top Rated Artists</strong>
		  </div>   
	      <div style="position:relative;">
			<a title="RSS Feed" href="http://localhost:8080/exist/ad/rssTopRatedTracks.xql"><img src="images/ico/rss16x16.png"></a> <strong>Top Rated Tracks</strong>
		  </div>  		       
      </div>
      
	 	  	
    </div>
  </div>
  
  <hr class="hidden" />
  <ul class="hidden">
    <li><a href="#view">Nahoru</a></li>
    <li><a href="#content">Zpět na obsah</a></li>
  </ul>
  <hr class="hidden" />
  
  <div id="foot">
    <p class="fl">&copy; all rights reserved</p>
    
    
    
    <!-- /#   LINKS AND AUTHOR-SIGNATURE CANNOT BE REMOVED !!! -->
    <p class="fr"><a href="www.tue.nl" title="See more ON">TUE</a> created by <a href="http://www.tue.nl" class="ico ico-breezy">TUE</a></p>
  </div>
</div>

</body>
</f:view>
</html>
